package com.yanze.service.impl;

import com.yanze.mapper.HomebannerMapper;
import com.yanze.pojo.Homebanner;
import com.yanze.service.HomeService;
import com.yanze.utils.BaseJSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class HomeServiceimpl implements HomeService{

    @Autowired
    HomebannerMapper mHomebannerMapper;

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public List<Homebanner> getHomeBanner() {
        List<Homebanner> banners = mHomebannerMapper.selectAll();
        return banners;
    }
}
